The invention relates to a video decoder and a corresponding method.
For coding video images, the MPEG standard has become established. It combines the principles of transformation and prediction coding with so-called hybrid coding. It contemplates three types of coded images, which are distinguished depending on the type of data compression:
1. I images (intra-coded images): The coding of an I image is done independently of other images. An I image is used to synchronize the transmission of a plurality of successive video images, and its coding utilizes the local correlation of the image data of the I image. The coding is preferably a discrete cosine transformation or DCT, followed by quantification and weighting of the transformation coefficients with ensuing entropy coding.
2. P images (predicted images): Their coding is dependent on a chronologically preceding I or P image (forward prediction). P images are subjected to motion estimation with respect to the preceding image (motion-compensated prediction). Next, intra-image coding (for example in the way described above for an I image) is used on the chronological prediction errors.
3. B images (bidirectionally predicted images): In these, chronological motion-compensated prediction is used, both with regard to a chronologically preceding and to a chronologically succeeding P or I image. The term xe2x80x9cmotion-compensated interpolationxe2x80x9d is also used. The expressions (chronologically) xe2x80x9csucceedingxe2x80x9d or xe2x80x9cprecedingxe2x80x9d refer not to the order of transmission of the images in the data stream of coded images but rather to their order of recording and playback. Images that are the basis for chronological prediction for coding another image are also known as support images. Like P images, B images are also coded in the form of quantified transformation coefficients of a differential image.
It is also known, particularly for showing on TV sets using the PAL or NTSC standard, for the playback of video images to be done not in the form of a so-called full frame but rather as two successive half-frames (xe2x80x9cinterlaced formatxe2x80x9d). A full frame has the total video image to be shown and thus includes all the lines of the image. Full frames are also called xe2x80x9cframesxe2x80x9d. Conversely, each of the two half frames (xe2x80x9cfieldsxe2x80x9d) includes only half of all the lines of one video image. The so-called xe2x80x9ctop fieldxe2x80x9d or first half-frame involves all the even-numbered lines, while the xe2x80x9cbottom fieldxe2x80x9d or second half-frame involves all the odd-numbered lines of the associated full frame.
An MPEG decoder must accordingly decode not only the coded video images in the correct order but also, if they are to be shown on TV sets on the PAL or NTSC standard, must assure that the requisite two half-frames required for the purpose will be furnished. The video images transmitted may, however, be either frame-coded or field-coded. In the first case, the video images that are transmitted are full frames, while in the second case they are half-frames, two of each of which again form one full frame.
MPEG decoders have memory devices for storing previously decoded support images. Storing the I or P images in memory is necessary, because they are the basis for a chronological prediction of a P or B image and are thus needed for decoding of that image. If a coded B image received from the decoder is to be processed, for instance, then decoding of the B image is done with the aid of the two support images used for its bidirectional prediction. It is noted that the support images were previously received by the decoder and stored in memory.
It is also known to store the support images, required for decoding a B image, not in decoded form but rather in coded form in the decoder in order to save memory space. However, this method has the disadvantage that the data throughput to be handled by the decoder is sharply increased. The same I and P images in fact generally serve to decode many B images, so that they have to be often decoded correspondingly. An even more decisive factor, however, is that in MPEG, block-based coding is contemplated, and the prediction regions in the support images that are used for the prediction often deviate from the block limits. To decode one block of a B image, therefore, four blocks of each of the two coded memorized support images must therefore be decoded. This means eight times the data throughput, compared with storage of decoded support images, is needed. The eight times greater data quantity, however, must as before be handled in the same unit of time available in total for decoding the predicted coded image. The demands in terms of performance of the decoder are accordingly considerably greater than in the case of support images stored in decoded form.
In conventional MPEG decoders, a memory device is also provided in which the decoded B image is stored (xe2x80x9can output frame bufferxe2x80x9d). The memory device is needed in conventional decoders in the case of a frame-coded B image, since as already noted two half-frames have to be created from the full frame by the decoder and if the full frame is to be shown in interlaced format, the two half-frames must be present successively at an output of the decoder. In the case of field-coded B images, however, the output frame buffer is still necessary for another reason. In some applications, it may be necessary (for instance for adaptation of different frame frequencies between the recording system and the playback system) for not merely two half-frames to be shown to make up one full frame but instead for the first half-frame to be repeated again after the second half-frame has been shown.
It is accordingly an object of the invention to provide a video decoder and a corresponding method, which overcomes the above-mentioned disadvantages of the prior art devices and methods of this general type, in which the memory requirement is low.
With the foregoing and other objects in view there is provided, in accordance with the invention, a video decoder, including: a memory storing a compression-coded image; a decoder having an output, the decoder receives the compression-coded image and performs a first decoding of the compression-code image and outputs a first decoded image at the output to be received by a playback device for playback; and the decoder subsequently performing a second decoding of the compression-coded image resulting in a second decoded image and outputting the second decoded image to the output.
According to the invention, the first image is stored in memory in the decoder not in decoded form (as in the prior art) but rather in coded form. To generate the necessary half-frames for playback, decoding is done at least twice. After each decoding operation, the outcome of decoding is output to an output of the decoder, in order to play it back (for instance using a TV set). An output frame buffer as in the prior art is not necessary. For storing the coded first image in memory, less memory space is necessary than if it were stored in decoded form as is the case in the prior art. The invention is not limited to the instance of MPEG decoders. It also relates to all cases where information must be generated multiple times from a first image for playback. Unlike the prior art, the stored, coded first image for generating the various information (such as two half-frames from one full frame) is newly decoded each time (each time, the image may need to be decoded only in part and not completely). In the prior art, complete decoding of the image is done first, the image is stored in memory and then output multiple times (for instance, outputting the two half-frames of a decoded full frame). The invention can also be used in decoding methods in which chronological prediction is not performed and no support images are provided.
In accordance with an added feature of the invention, there is a further memory connected to the decoder and stores a further image, the compression-coded image is predicted time-wise with respect to the further image in the decoder and the compression-coded image is not used for time-wise prediction of any other coded image, and the decoder decoding the compression-coded image in each case with the aid of the further image stored in the further memory.
The invention relates to a video decoder by the MPEG standard and provides that the first image is predicted chronologically to a second image but is not itself needed to decode another image (that is, it is not used for chronological prediction of another image and therefore need not be decoded to decode another image). A first image of this kind may for instance be a P or B image.
Compared with the prior art in which storage of the coded support images (namely, I images and/or P images) is provided, the invention has the advantage that a far lesser quantity of data has to be decoded. This is for the following reasons: In the prior art, before a B image is decoded, the I and P images, which are stored in coded form and are the basis for its chronological prediction, must first be decoded. This decoding of the I images and P images must be done anew for each B image to be decoded. This multiplies the amount of data to be decoded by the decoder.
In the invention, conversely, in the worst case the quantity of data to be decoded is doubled, specifically in the case of a frame-coated B image as the first image, in which according to the invention a first decoding is done to create the first half-frame and a second decoding is done to create the second half-frame from the coded full frame. Advantageously, however, the doubling of the data quantity to be decoded can be avoided, since to obtain one half-frame from a coded full frame, at most a limitation to decoding of the lines relevant to the half-frame to be created can be done. This is true for instance for motion compensation, but also for most cases of inverse quantification and inverse DCT.
In accordance with an additional feature of the invention, the compression-coded image is a full frame, and the decoder creates a first half-frame from the compression-coded image by the first decoding and a second half-frame from the second decoding.
In accordance with another feature of the invention, after the second decoding the decoder creates again the first half-frame by a third decoding of the compression-coded image stored in the memory which results in a third decoded image and outputs the third decoded image to the output.
In accordance with a further added feature of the invention, the compression-coded image is a first half-frame (BT), and the decoder serving by successive decodings to successively create a stored first half-frame, a coded second half-frame, and again the stored first half-frame.
In accordance with a further additional feature of the invention, the memory stores in addition to the compression-coded image a compression-coded further image, the decoder decodes the compression-coded further image multiple times and outputs the results of the decoding to the output.
With the foregoing and other objects in view there is also provided, in accordance with the invention, a method for decoding image data, which includes: storing a compression-coded image in a memory resulting in a stored image; decoding the stored image in a decoder having an output resulting in a first decoded image, the decoder outputting the first decoded image at the output for playback by a playback device; and decoding the stored image a second time resulting in a second decoded image and outputting the second decoded image to the output.
In accordance with a concomitant feature of the invention, there are the steps of storing a further image in a further memory; predicting the compression-coded image time-wise with respect to the further image and the compression-coded image is not used for time-wise prediction of any other coded image; and performing the decoding of the compression-coded image each time with the aid of the further image stored in the further memory.
Other features which are considered as characteristic for the invention are set forth in the appended claims.
Although the invention is illustrated and described herein as embodied in a video decoder and a corresponding method, it is nevertheless not intended to be limited to the details shown, since various modifications and structural changes may be made therein without departing from the spirit of the invention and within the scope and range of equivalents of the claims.
The construction and method of operation of the invention, however, together with additional objects and advantages thereof will be best understood from the following description of specific embodiments when read in connection with the accompanying drawings.